﻿using Estsh.Core.Base;
using Estsh.Core.Model.Extend;
using Estsh.Core.Model.Extend.Models;
using Estsh.Core.Models;
using Estsh.Core.Repositories;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;

namespace Estsh.Core.Wms.IRepositories
{
    public interface IMoveRepository : IBaseRepository<BaseEntity>
    {
        public string UpdateRackPackageInfo(SysStock stockInfo, int ruId, string loginId,int sumQty,int cartRuId);
        public string InsertRackPackageInfo(SysStock cartStockInfo,SysStock rackStockInfo, string loginId,string rackNo); 
        public string InsertStockInfo(List<WmsRackPackage_Extend> rackPackageInfo, string loginId); 
        public List<WmsRackPackage_Extend> GetRackPackageInfo(string rackNo);
        public WmsRack_Extend GetRackInfo(string rackNo);
        public WmsRackPackage_Extend GetPackagePaetNo(string rackNo,string partNo);
        public SysStock_Extend CheckCartonNoStatus(string CartonNo);
        public List<SysStock_Extend> CheckCartonNolist(string CartonNo);
        public List<SysStock> GetcartNoInfos(string CartonNo);

        public List<SysLocate> CheckLocateStatus(string locateName);

        public List<SysStock> CheckUseStockCapacity(string cartonNo);

        public List<SysStock_Extend> CheckCartonNoStatusByPack(string cartonNo);

        public string UpdateStockStatus(List<SysStock_Extend> oldStock, List<SysLocate> locate, int status, int TransType, string loginId);

        public string UpdateStockStatusByMoveOrder(List<SysStock> oldStock, List<SysLocate> locate, int status, int TransType, string loginId, string orderNo);


        public List<SysStock> GetCartonNoInfoByPack(string cartonNo);

        public List<SysStock> GetCartonNoInfo(string cartonNo); 
        public List<WmsRackPackage_Extend> GetCartonInfo(string rackNo);

        public List<WmsMoveHeader> GetMoveOrderList(string cartonno);

        public List<WmsMoveDetail> CheckMoveOrderLocate(string orderNo);

        public List<WmsRackPackage_Extend> GetRackPartNo(string rackNo);

        public string ChangeMoveHeaderStatus(string loginId, string orderNo);

        public List<WmsMoveDetail_Extend> GetMoveDetailInfo(string orderNo);

        public SysStock GetStockCartonInfo(string cartonNo);

        public SysStock_Extend GetCartonNoInfo2(string cartonNo);

        public List<SysStock> CheckMaterialSplit(int locateId, string locateCode, string rackNo,List<WmsRackPackage_Extend> packlist, List<WmsMoveDetail_Extend> detInfo, List<SysStock> oldStock, int splitNum, string loginId, int splitCount);

        public List<SysStock> PickingCheckMaterialSplit(int? locateId, string locateCode, string rackNo, List<SysStock> oldStock, int splitNum, string loginId, int splitCount);
        public List<SysStock> GetMaterialInfo(string cartonNo);

        public SetObjectDetail UpdtePickingInfo( WmsRackPackage_Extend pack, SysStock Stock, string loginId, string rackNo, string SplitQty, string rackOrCartNo ,int? locateId,string locateName);

        public SetObjectDetail UpdteStatus(int? locateId, string locateName,string orderNo, List<WmsMoveDetail_Extend> detail, SysStock Stock, string loginId, string isSplit,string rackNo,string SplitQty,string rackOrCartNo);

        public SysLocate GetLocateZTbin();

        public WmsRackPackage_Extend GetpackageInfo(string cortonNo);

        public string UpdatepackageInfo(string cortonNo);


        public List<WmsMoveHeader> GetMoveSourceOrderList(string orderNo);

        public List<WmsMoveHeader> GetMoveSourceListByOrderNo(string orderNo);

        public List<WmsMoveSn> GetMoveSnInfo(string orderNo);

        public string UpdteMoveStatus(List<WmsMoveDetail> wmsMoveDetails,string orderNo, List<WmsMoveSn> moveSn, SysStock Stock, string loginId, int locateId, string locateCode);

        public List<WmsMoveDetail> GetMoveDetailList(string orderNo);

        public bool InsertInterfaceByNCConcession(List<WmsMoveDetail> moveDetails);

        public SysStock GetSplitCartonInfo(string cartonNo);

        public List<SysStock> UpdatePickingLocate(WmsRackPackage_Extend rackPackageInfo, int? locateId, string locateCode, string rackNo, List<SysStock> oldStock, int splitNum, string loginId);

        public WmsRack_Extend GetRackInfo2(string rackNo);

        public string UpdateStockInfo(string rack, string cartonNo, int? zoneId, string zoneName, string loginId);

        public string CheckFullBoxPicking(List<WmsRackPackage_Extend> rackPackageList, SysStock_Extend stockInfo2, string rack, string cartonNo, string loginId);

        public List<WmsRackPackage_Extend> GetRackCartonInfo(string cortonaNo);

        public List<WmsRackPackage_Extend> GetRackCartonList(string rackNo);

        public List<WmsRackPackage_Extend> GetTorrRackList(string rackNo);

        public List<WmsMoveHeader> GetReturnMaterialInfo(string onLine);

        public SysStock_Extend GetCartonNoZoneType(string cartonNo);

        public List<WmsRackPackage_Extend> GetrackPackageInfo(string rackNo);

        public List<WmsRackPackage_Extend> GetcartnoPackageInfo(string cortonno);

        public WmsRackPackage_Extend GetmoveHeaderInfo(string cartonNo, string orderNo);

        public List<SysLocate> GetLocateInfo(string locate_name);

        public List<SysStock> GetLocateCapacity(string locate_id);

        public List<WmsMoveDetail_Extend> CheckMoveDetail(string orderNo, int status);

        public SetObjectDetail UpdteMoveInfo(List<WmsMoveDetail_Extend> wmsMoveDetails, SysStock Stock, string loginId, string SplitQty, int locateId, string locateName);

        public List<SysStock> UpdateReturnMaterialInfo(string orderNo, List<WmsMoveDetail_Extend> wmsMoveDetails, SysStock_Extend stockInfo, int? locateId, string locateCode,int zoneId ,string zoneCode, string rackNo, List<SysStock> oldStock, int splitNum, string loginId, int splitCount);

        public SetObjectDetail UpdteStockRackNoInfo(SysStock_Extend stockInfo, string loginId, string rackNo, int locateId, string locateCode, int zoneId, string zoneCode);

        public SetObjectDetail UpdteStatusBatach(int? locateId, string locateName, string orderNo, List<WmsMoveDetail_Extend> detail, SysStock Stock, string loginId, string isSplit, string rackNo, string SplitQty, string rackOrCartNo);

    }
}
